import React from 'react'
import SearchInput from "../../../components/SearchInput"
import { useSelector } from "react-redux"
import { useHistory } from "react-router-dom"

export default function ShopHeader () {
  const city = useSelector(state => state.city.city);
  const history = useHistory();

  function clickHandel () {
    // console.log("点击");
    history.push("/city")
  }
  return (
    <div id="homeHeader" className="clear-fix" >
      <div className="home-left" onClick={clickHandel}>{city}<i className="icon-angle-down"></i></div>
      <div className="home-search">
        <i className="icon-search"></i>
        {/* <input type="text" placeholder="搜索您想住的区域或小区" /> */}
        <SearchInput />
      </div>

      <div className="home-right">
        <i className="iconfont icon-car"></i>
      </div>

    </div>
  )
}
